const Mock = require('mockjs');
const data = Mock.mock({
    'list|4': [{
        img: '@image(100x100,@color)',
        title: '@ctitle(15,30)',
        'price|15-100': 0,
        num: 1,
        id: '@id',
        isCheck: false
    }]
})
console.log(data.list);

module.exports = {
    devServer: {
        before(app) {
            app.get('/shopCar', (req, res) => {
                res.send(data.list)
            })
        }
    }
}